<div class="row justify-content-center">
    <div class="col-8">
        <div *ngIf="product">
            <h2><span jhiTranslate="gatewayApp.storeProduct.detail.title">Product</span> {{product.id}}</h2>
            <hr>
            <jhi-alert-error></jhi-alert-error>
            <dl class="row-md jh-entity-details">
                <dt><span jhiTranslate="gatewayApp.storeProduct.title">Title</span></dt>
                <dd>
                    <span>{{product.title}}</span>
                </dd>
                <dt><span jhiTranslate="gatewayApp.storeProduct.price">Price</span></dt>
                <dd>
                    <span>{{product.price}}</span>
                </dd>
                <dt><span jhiTranslate="gatewayApp.storeProduct.image">Image</span></dt>
                <dd>
                    <div *ngIf="product.image">
                        <a (click)="openFile(product.imageContentType, product.image)">
                            <img [src]="'data:' + product.imageContentType + ';base64,' + product.image" style="max-width: 100%;" alt="product image"/>
                        </a>
                        {{product.imageContentType}}, {{byteSize(product.image)}}
                    </div>
                </dd>
            </dl>

            <button type="submit"
                    (click)="previousState()"
                    class="btn btn-info">
                <fa-icon [icon]="'arrow-left'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.back"> Back</span>
            </button>

            <button type="button"
                    [routerLink]="['/product', product.id, 'edit']"
                    class="btn btn-primary">
                <fa-icon [icon]="'pencil-alt'"></fa-icon>&nbsp;<span jhiTranslate="entity.action.edit"> Edit</span>
            </button>
        </div>
    </div>
</div>
